package day2.about_stack;
/**
 * 线程栈帧
 */
public class Main {
    public static void main(String[] args) {
        MyThread t = new MyThread();
        t.start();

        // 自己在主线程中也去调用 add 方法
        System.out.println(Add.add(10, 20));
    }
}

class MyThread extends Thread {
    @Override
    public void run() {
        System.out.println(Add.add(1, 2));
    }
}

class Add {
    public static int add(int a, int b) {
        return a + b;
    }
}